<template>
  <div class="main2">
    <div class="main-top">
      <div class="main-top-L" @click="big">雷达图</div>
      <!-- <div class="main-top-R">
        <div class="main-top-R-son"></div>
      </div> -->
    </div>
    <div class="main-bottom">
      <baidu-map
        class="bm-view"
        :center="center"
        :zoom="zoom"
        @ready="handler"
        :scroll-wheel-zoom="true"
      ></baidu-map>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      center: { lng: 0, lat: 0 },
      zoom: 3
    };
  },
  methods: {
    handler({ BMap, map }) {
      console.log(BMap, map);
      this.center.lng = 116.404;
      this.center.lat = 39.915;
      this.zoom = 15;
    },
    big() {
      console.log(888888);
      
    }
  }
};
</script>

<style scoped lang="less">
.main2 {
  background: #fff;
  box-shadow: 0px 0px 10px 0px rgba(102, 102, 102, 0.3);
  height: 310px;
  .main-top {
    height: 38px;
    line-height: 38px;
    padding: 0 10px;
    .main-top-L {
      float: left;
      height: 38px;
      line-height: 38px;
      font-size: 16px;
      color: #000;
      font-weight: 500;
    }
    .main-top-R {
      float: right;
      height: 38px;
      line-height: 38px;
      width: 30px;
      .main-top-R-son {
        // background: red;
        border: 1px solid #000;
        height: 30px;
        margin-top: 8px;
        cursor: pointer;
      }
    }
  }
  .main-bottom {
    // background: red;
    height: 100%;
  }
  .bm-view {
    width: 100%;
    height: 100%-12px;
  }
}
</style>